<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateNdTPurchaseCarTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		// Create the `PurchaseCar` table
		Schema::create('nd_t_purchase_car', function(Blueprint $table)
		{
            $table->increments('id');
            $table->date('purchase_date');
            $table->string('car_maker', 40);
            $table->string('car_type', 40);
            $table->string('model_year', 8);
            $table->string('chasis_number', 40);
            $table->string('color', 40)->nullable();
            $table->boolean('number_plate_flag')->nullable();
            $table->integer('purchase_price')->nullable();
            $table->integer('purchase_price_fixed')->nullable();
            $table->integer('consumption_tax')->nullable();
            $table->integer('recycle_fee')->nullable();
            $table->string('car_certification', 255)->nullable();
            $table->integer('auction_comission')->nullable();
            $table->integer('transport_fee_japan')->nullable();
            $table->integer('transport_fee_japan_fxd')->nullable();
            $table->integer('nmh_commision')->nullable();
            $table->integer('service_company_id');
            $table->boolean('tic_june_flag')->nullable();
            $table->integer('car_auction_id');
            $table->integer('exhibit_number')->nullable();
            $table->integer('customer_id');
            $table->integer('vanning_company_branch_id');
            $table->integer('burtgel_solih')->nullable();
            $table->integer('export_erasure')->nullable();
            $table->integer('car_tax_cancel')->nullable();
            $table->integer('send_export_erasure_to_transport_company')->nullable();
            $table->integer('fax_export_erasure_to_auction')->nullable();
            $table->integer('mail_export_erasure_to_nmc')->nullable();
            $table->integer('car_liability_insurance_cancel')->nullable();
            $table->integer('recycle')->nullable();
            $table->string('comment', 1000)->nullable();
            $table->integer('cancel_flag')->nullable();
            $table->integer('cancel_fee')->nullable();
            $table->integer('re_auction_flag')->nullable();
            $table->integer('auction_penalty')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Delete the `PurchaseCar` table
        Schema::drop('nd_t_purchase_car');
    }
}
